#ifndef __SURFACE_H__
#define __SURFACE_H__

#include <d3d9.h>

//#include "Global.h"

#include <d3dx9.h>
#include "Trace.h"


/**--------------------------------------------------------
*Program/Project : GameMario
*Written by : 
*Email :
*Created date : 7/10/2012
*Modified by :
*Modified date :
*Version : 1.0
*Description : Lop khoi tao Surface
--------------------------------------------------------**/


class Surface
{
private:
	LPDIRECT3DDEVICE9		d3ddv;			//Direct3D device
	LPDIRECT3DSURFACE9		backBuffer;		// The buffer of direct3d

	LPWSTR file_name;
	LPDIRECT3DSURFACE9 surface;

public:
	Surface(LPDIRECT3DDEVICE9 d3ddv, LPDIRECT3DSURFACE9 backBuffer, LPWSTR file_name);
	~Surface();

	LPWSTR getFileName() { return file_name;}
	LPDIRECT3DSURFACE9 getSurface() { return surface;}

	void Draw(const RECT* p_sRect, const RECT* p_dRect);
	void Load();
	
};

#endif